﻿<?php 
		
	//chamando a conexão e as funções
	include '../conexao.php';
	include 'funcoes.php';
	
	//inicia a sessão e verifica se o aluno esta logado
	session_start();
	
	if(isset($_SESSION['log']) && isset($_SESSION['turma']) && isset($_SESSION['curso']) && isset($_SESSION['ano'])){
		$turma = $_SESSION['turma'];
		$log   = $_SESSION['log'];
		$data  = DBRead($turma,"WHERE matricula = '{$log}'");
		$_SESSION['id_aluno'] = $data['id'];
		if(!$data == false){
?>
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <meta charset="iso-8859-1">
        <title>Avaliação Diagnóstica</title>
        <link rel="stylesheet" type="text/css" media="all" href="../css/avaliacao.css">
        <link rel="shortcut icon" href="../img/favicon_jfk2.png">
        <!-- <script type="text/javascript" src="../js/jquery.cycle.all.js"></script> -->   
		<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="../js/avaliacao.js"></script>
        <script type="text/javascript" src="../js/load.js"></script>
        <script type="text/javascript" src="../js/ajax.js"></script>
        <script type="text/javascript" src="../js/jQuery v1.8.3.js"></script>
        <script type="text/javascript">
			// Use jQuery com a variavel $j(...)
				var $j = jQuery.noConflict();
					$j(document).ready(function() {
						$j(".voltarTopo").hide();
						$j(function () {
							$j(window).scroll(function () {
								if ($j(this).scrollTop() > 300) {
									$j('.voltarTopo').fadeIn();
								} else {
									$j('.voltarTopo').fadeOut();
								}
							});
								$j('.voltarTopo').click(function() {
								$j('body,html').animate({scrollTop:0},600);
							}); 
						});
					});
		</script>
</head>
    
    <body id="voltarTopo">
        <section>

        	<div id="aluno">
            	 <div id="logo_aluno"><img src="../img/aluno.png"></div><br>
                 <span class="nome">Nome:</span><span id="nome"><?php echo $data['nome']?></span><br><br>
                 <span class="matricula">Matrícula:</span><span id="mat"><?php echo $data['matricula'];?></span><br><br>
                 <span class="turma">Turma:</span><span id="turma">
				 <?php echo $_SESSION['curso'];?>&nbsp;
                 <span class="ano">Ano:</span> <?php echo $_SESSION['ano'];?> </span>
                 <span id="sair"><a href="logout.php">Sair</a></span>
            </div>

 
            <div id="professores">     
            	<nav>
                	<ul>
                    	<li><a href='#' class='lin'>Linguagens e Códigos</a></li><br>
                    	<div style="height:auto;
                        			width:auto;
                                    position:relative" 
                                  	id="lin"><?php professor('linguagens',$data['id']); ?></div>
                    	<li><a href='#' class='nat'>Ciências da Natureza</a></li><br>
                    	<div style="height:auto;
                        			width:auto;
                                    position:relative" 
                                    id="nat"><?php professor('natureza',$data['id']); ?></div>
                    	<li><a href='#' class='hum'>Ciências Humanas</a></li><br>
                    	<div style="height:auto;
                        			width:auto;
                                    position:relative" 
                                    id="hum"><?php professor('humanas',$data['id']); ?></div>
                    	<li><a href='#' class='tec'>Técnicos</a></li>
                    	<div style="height:auto;
                        			width:auto;
                                    position:relative" 
                                    id="tec"><?php professor('tecnico',$data['id']); ?></div>
                 </ul>
            </nav>
        
          </div>
        </section>
        
        <article id="article">
       		
        	  
			
    	</article>
        
        <a href="#" onClick="$j('html,body').animate({scrollTop: $j('#voltarTopo').offset().top}, 2000);" title="Voltar ao Topo">
        	<div class="voltarTopo"><img src="../img/goup.png" width="90" height="90"></div>
        </a>

    </body>
</html>
<?php 
		}else{
			header("Location: ../index.php");
		}
	}else {
		header("Location: ../index.php");	
	}
?>